package com.architecture.persistence.hibernate;

import org.hibernate.Criteria;
import org.hibernate.Session;

import com.architecture.entity.Entity;
import com.architecture.persistence.dao.DAO;

/**
 * <p>Represents the generic DAO to provide methods especified in <code>hibernate framework</code></p>
 * @author JR
 * @param <E>
 */
public interface HibernateDAO<E extends Entity> extends DAO<E> {
	
	/**
	 * <p>Returns the hibernate session.</p>
	 * @return <code>Session</code>
	*/
	Session getSession();
	
	/**
	 * <p>Create a new criteria object.</p>
	 * @return <code>Criteria</code>
	*/
	Criteria newCriteria();
	
	/**
	 * <p>Returns the persistent class.</p>
	 * @return <code>Class<E></code>
	 */
	Class<E> getPersistentEntity();
	
}
